Sony UniLink (Sony Bus)
Here is a great UniLink project based on PIC microcontroller.
Note that this information copyright by Sony
Sony UniLink Sources:
UniLink Guidebook | 9-956-741-21
|
CDX-U500 Training Manual | A-114792-01
|
Take a look at the XA-107 and XA-300 Unilink AUX input device:
UniLink Connector
Pin Out:
- Ready (on older systems)
- Reset (from master)
- SIRCS (decoded by master then may issue UniLink commands)
- Clock (from master)
- Data (bidirectional 5V TTL I/O)
- Bus On (from master, cascaded to other slaves)
- Battery/Backup Power (+12V 2A max)
- Ground (for communications)
- Ready
Use Unknown. Not Connected.
- Reset (from master)
Reset signal sent to slaves. Slaves can not send resets to master.
LOW going pulse signals the system reset.
- SIRCS (decoded by master then may issue UniLink commands)
This line is used by the master to receive SIRCS data
(Serial InferRed Control System, also known as Control-S).
The master may understand the request and then
send UniLink control messages. Most slaves to not use this becase they are not
in range of the user and/or don't understand SIRCS.
- Clock (from master)
Bus clock signal generated from the master for all bus signals.
- Data (bidirectional I/O and Request)
When the bus is active it may be idle or active. When idle the bus
appears as a square wave with a period of 16ms (8ms low and 8ms high). When the data bus is
active and data is flowing the pulse width of the square wave will
change length depending on the data word length
(see secton on data communication).
- Data from the master is made of positive pulses and is sent when the
Bus is LOW
- Data from the slave is made of negative pulses and is sent when the
Bus is HIGH
Master can send communications at any time. Slaves must send a request for
polling. When the master polls slaves can respond.
- Bus On (from master, cascade to other slaves)
Bus on can only be activated from the master (but the slave can request a
wakeup). When the bus is off, it is in 'sleep' mode and there is no data
communications. High=ON. Low=OFF
- Battery/Backup Power (12V 2A)
- Ground (for communications)
- Signals are TTL OV (LOW) or 5V (HIGH)
- There is only one master.
- There can be many slaves. There are two way to connect slaves:
- Serial: Each slave is attached to the next and finally the master. Each
slave is polled in serial.
- Source Selector: Each slave is attached to a selector box. Only one slave
per port on the selector is allowd. Each slave is polled from the selector.
- There is no direct slave to slave communication. The master allows all
communication. (the slave can request that the master talk to them)
- The basic head unit is the master. It's tuner, keypad, display, cd unit,
and tape are all 'internal' slaves. The master is just a CPU in the head. This
allows all units internal and extrnal to be 'equal'
- All slaves know their own 'group' id. Each slave is assigned a 'member'
ID by the master during 'initial link mode'
(there can be several slaves of the same group)
- UniLink bit rate is about 9600 baud
- SIRCS is decoded by the master (optionally)
Modes
- Sleep Mode
When bus on is Low, the bus is in sleep modem and no communication occures.
- Wake Up
The slave can request a wakeup from the master. The slave will force the
data bus high. When the master sees the request it will active the bus
with the bus on line.
- Active Mode
- idle/standby (no data activity, just square wave)
- Initial Link (all slaves will be polled)
- Time Polling (master will poll slaves every 600ms or so, just to check))
- Request Polling (slave requesting to send to the master)
- Idle/Standby
- Inital Link
The master must find all slaves:
- Each slave will be polled with the Anyone command short word
- The slave responds by telling the master what group type it is.
- The master will assign the slave a member address in its group
- The slave will remember the address and acknowledge its new address
- The master ends polling with Appoint end command short word
- The slave returns a NAK to end the link
The master will then issue the Link On command to see if there are more
slaves beyond the one it just found.
- Time Polling
The master cheks the slaves to see if they are still there and if there
is any status update.
- Request Polling
When slaves want to send data they make a 'request' The master will then
poll all slaves for information
Data Format
Idle | dataline is low for 8ms then high for 8ms
|
short word | 11ms
|
medium word | 16ms
|
long word | 21ms
|
Line is stable 3ms before first byte (included in total time)
Word Length: (each byte is 8 bits)
Short Word | 6 bytes
|
Middle Word | 11 bytes
|
Long Word | 16 bytes
|
Each word contains:
- Two address bytes
RAD (to/receiver address)
TAD (from/transmitter address)
Both are 4bits Group and 4bits Member
- Two Operation data bytes (OP bytes)
- Parity Byte
- Additional Data and Parity bytes
Short Word | No extra data bytes | No Second Parity
|
Middle Word | 6 data bytes | Second Parity Byte
|
Long Word | 11 data bytes | Second Parity Byte
|
- Error Byte
To indicate failure of function
This byte is optional and only transmitted if there is an error code
(FF=no error?)
Codes:
TAD/RAD
10 | Master (head CPU)
|
18 | Entire System (Broadcast)
|
30 | CD Group (Broadcast)
|
Short Word OP
01 02 | Anyone?
|
01 04 | Appoint End
|
Error Byte Codes
Other Images: